#include "my.h"

SDL_Surface *srfWindow;
SDL_Surface *srfBackground;

void mainTitle()
{
  SDL_Event evtTitle;
  int resume = 1;
  
  while (resume == 1)
  {
    SDL_WaitEvent(&evtTitle);
    switch(evtTitle.type)
    {
      case SDL_KEYDOWN:
        switch(evtTitle.key.keysym.sym)
        {
          case SDLK_SPACE:
            resume = 2;
            break;
        }
        break;
      case SDL_QUIT:
        resume = 0;
        break;
    }
    refreshBackground();
    SDL_Flip(srfWindow);
  }
  if(resume == 2)
    mainGame();
}
